<style>
    .layui-form-pane .layui-form-label{width:auto;}
    .layui-form-item{margin-bottom: 0px;}
    .order-time-bg{background-color:#1E9FFF;color:white;padding:0px 5px;}
    .page-toolbar{min-height: 45px!important;}
    /****/
    .showAddress{height: 60px;line-height: 60px;padding-left:10px;background: rgb(216 216 216)}
    .chuizhi-nav li{height: 42px;line-height:42px;padding-left:10px;width:180px;background: #FFFFFF;border: 1px solid #F0F0EE}
    .cont-main{max-height: 100%;width: 100%;}
    .dm-left{width: 189px;float:left}
    .layui-this{background-color: #009688!important;}
    .layui-this a{color: #fff!important;}
</style>
<!--<div class="page-toolbar" style="min-height: 100px;">
    <div class=" fixed-bar">
        <form class="layui-form layui-form-pane fixed-bar-form" action="{:url()}" method="get" id="hisi-table-search">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">订单号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="client_ordernum" lay-verify="" placeholder="输入订单号" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">SKU</label>
                    <div class="layui-input-inline">
                        <input type="text" name="sku"  placeholder="" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">展示地点</label>
                    <div class="layui-input-inline">
                        {:Form::select('address_id', '', $new_list, '', '')}
                    </div>
                </div>
                <div class="layui-inline layui-upload">
                    <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">搜索</button>
                </div>
            </div>
        </form>
    </div>
</div>-->
<div style="height: 52px;">
    <div class="layui-colla-title removeStat" style="height:auto;border-radius:2px;padding:3px 14px;margin-top:10px;">
        <a href="{:url('localBoard/boardList')}" class="layui-btn layui-btn-primary layui-btn-sm layui-icon layui-icon-set hisi-iframe"  hisi-data="{width: '100%', height:'99%'}" style="float:left;margin-top:5px;" title="设置配置看板">&nbsp;设置配置看板</a>
    </div>
</div>
<div class="cont-main">
<!--垂直导航--->
    <div class="dm-left">
        <div class="showAddress"> <span>展示地址</span></div>
        <div>
            <ul class="chuizhi-nav" lay-filter="test">
                {foreach $menuList as $k=>$v}
                <li {if $address_id==$v.address_id} class="layui-this" {/if}><a data-id="{$v.address_id}" data-url="{:url('/mp/localBoard/index')}?address_id={$v.address_id}" href="#">{$v.address_name}</a></li>
                {/foreach}
            </ul>
        </div>
    </div>
    <!--显示主体--->
    {include file="local_board/board_show" /}
<!--    <iframe id="iframeMain" src="" style="width: 100%"; height="100%";></iframe>-->

</div>
<div style="clear:both"></div>
<!--iframe ending--->

<script type="text/javascript">
    layui.use([ 'element', 'layer', 'laytpl', 'tool','laydate','table','form','flow','upload'], function() {
        var element = layui.element;
        var layer = layui.layer;
        var form = layui.form;
        var laytpl = layui.laytpl,laydate=layui.laydate ,table = layui.table;
        var upload=layui.upload;

        //展示地址：菜单点击
        $(document).on('click','.chuizhi-nav >li',function(){
               var url= $(this).find('a').attr('data-url');
               var address_id= $(this).find('a').attr('data-id');
                //loading 0.1透明度的白色背景
               var myMsg =layer.load(1, {shade: [0.1,'#fff']});
               $('.chuizhi-nav >li').removeClass('layui-this');
               $(this).addClass('layui-this');
                setTimeout(function() {
                    layer.close(myMsg);
                }, 2000);
            $.ajax({
                type: "POST",
                url: url,
                data: "",
                dataType:"json",
                success: function(res){
                    layer.close(myMsg);
                    var content = laytpl($('#economiesSummaryTemplate').html()).render({data:res.data,TotalCapacity:res.TotalCapacity,address_name:res.address_name,address_id:address_id});
                    $('.dm-main').html(content);
                    if (res.code == 0 || res.code == 1 ) {
                        //设置滚动速度
                        for(var i=0;i<res.data.length;i++){
                            if (res.data[i].list.length > 6 && typeof (res.data[i]) != 'undefined' && res.data[i] != null) {
                                $(".autoScroll_"+i).scrollQ({'speed_setting': (res.data[i].speed_seting) * 1000});
                            }
                        }

                    } else {
                          layer.msg(res.msg, {icon: 2,anim: 6});
                    }
                }
            });

        });

        // 刷新当前页
        window.reloadTable = function () {
            var that = $("#hisi-table-search-optable"),
                arr = that.serializeArray(),
                where = new Array(),
                dataTable = that.attr('data-table') ? that.attr('data-table') : 'dataTable',
                currPage = $(".layui-laypage-em").next().html(),
                options = new Function('return '+ that.attr('hisi-data'))() || {page: {curr:currPage}};
            for(var i in arr) {
                where[arr[i].name] = arr[i].value;
            }

            options.url = that.attr('action');
            options.where = where;

            opTable.reload(options);
            return false;
        }

    });

</script>